package com.yocan.generator.Exception;

/**
 * 自定义异常
 */
public class BaseException extends RuntimeException{
    private String message;
    private int code = 500;
    public BaseException() {
        super();
    }

    public BaseException(String message) {
        super(message);
        this.message = message;
    }

    public BaseException(String message, Throwable e) {
        super(message, e);
        this.message = message;
    }

    public BaseException(String message,int code) {
        super(message);
        this.message = message;
        this.code = code;
    }

    public BaseException(String message,int code, Throwable e) {
        super(message, e);
        this.message = message;
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
